home *** CD-ROM | disk | FTP | other *** search
- /*
- * main_control_ui.c - User interface object initialization functions.
- * This file was generated by `gxv' from `main_control.G'.
- * DO NOT EDIT BY HAND.
- */
-
- #include <stdio.h>
- #include <sys/param.h>
- #include <sys/types.h>
- #include <xview/xview.h>
- #include <xview/canvas.h>
- #include <xview/panel.h>
- #include <xview/scrollbar.h>
- #include <xview/svrimage.h>
- #include <xview/termsw.h>
- #include <xview/text.h>
- #include <xview/tty.h>
- #include <xview/xv_xrect.h>
- #include "main_control_ui.h"
-
- /*
- * Initialize an instance of object `ctrlwin'.
- */
- main_control_ctrlwin_objects *
- main_control_ctrlwin_objects_initialize(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- if (!ip && !(ip = (main_control_ctrlwin_objects *) calloc(1, sizeof (main_control_ctrlwin_objects))))
- return (main_control_ctrlwin_objects *) NULL;
- if (!ip->ctrlwin)
- ip->ctrlwin = main_control_ctrlwin_ctrlwin_create(ip, owner);
- if (!ip->controls1)
- ip->controls1 = main_control_ctrlwin_controls1_create(ip, ip->ctrlwin);
- if (!ip->message1)
- ip->message1 = main_control_ctrlwin_message1_create(ip, ip->controls1);
- if (!ip->image_fname)
- ip->image_fname = main_control_ctrlwin_image_fname_create(ip, ip->controls1);
- if (!ip->file)
- ip->file = main_control_ctrlwin_file_create(ip, ip->controls1);
- if (!ip->quit)
- ip->quit = main_control_ctrlwin_quit_create(ip, ip->controls1);
- if (!ip->prev)
- ip->prev = main_control_ctrlwin_prev_create(ip, ip->controls1);
- if (!ip->next)
- ip->next = main_control_ctrlwin_next_create(ip, ip->controls1);
- if (!ip->frame_stat)
- ip->frame_stat = main_control_ctrlwin_frame_stat_create(ip, ip->controls1);
- if (!ip->func_sel)
- ip->func_sel = main_control_ctrlwin_func_sel_create(ip, ip->controls1);
- if (!ip->reg_type)
- ip->reg_type = main_control_ctrlwin_reg_type_create(ip, ip->controls1);
- if (!ip->message2)
- ip->message2 = main_control_ctrlwin_message2_create(ip, ip->controls1);
- if (!ip->log_num)
- ip->log_num = main_control_ctrlwin_log_num_create(ip, ip->controls1);
- if (!ip->eval)
- ip->eval = main_control_ctrlwin_eval_create(ip, ip->controls1);
- if (!ip->refresh)
- ip->refresh = main_control_ctrlwin_refresh_create(ip, ip->controls1);
- if (!ip->clear)
- ip->clear = main_control_ctrlwin_clear_create(ip, ip->controls1);
- if (!ip->clear_all)
- ip->clear_all = main_control_ctrlwin_clear_all_create(ip, ip->controls1);
- if (!ip->display)
- ip->display = main_control_ctrlwin_display_create(ip, ip->controls1);
- if (!ip->setting1)
- ip->setting1 = main_control_ctrlwin_setting1_create(ip, ip->controls1);
- if (!ip->lmode)
- ip->lmode = main_control_ctrlwin_lmode_create(ip, ip->controls1);
- if (!ip->controls2)
- ip->controls2 = main_control_ctrlwin_controls2_create(ip, ip->ctrlwin);
- if (!ip->statmsg1)
- ip->statmsg1 = main_control_ctrlwin_statmsg1_create(ip, ip->controls2);
- if (!ip->statmsg2)
- ip->statmsg2 = main_control_ctrlwin_statmsg2_create(ip, ip->controls2);
- if (!ip->statmsg3)
- ip->statmsg3 = main_control_ctrlwin_statmsg3_create(ip, ip->controls2);
- if (!ip->statmsg4)
- ip->statmsg4 = main_control_ctrlwin_statmsg4_create(ip, ip->controls2);
- if (!ip->controls3)
- ip->controls3 = main_control_ctrlwin_controls3_create(ip, ip->ctrlwin);
- if (!ip->edit_mode)
- ip->edit_mode = main_control_ctrlwin_edit_mode_create(ip, ip->controls3);
- if (!ip->edit_ok)
- ip->edit_ok = main_control_ctrlwin_edit_ok_create(ip, ip->controls3);
- if (!ip->message7)
- ip->message7 = main_control_ctrlwin_message7_create(ip, ip->controls3);
- if (!ip->edit_log_num)
- ip->edit_log_num = main_control_ctrlwin_edit_log_num_create(ip, ip->controls3);
- if (!ip->button1)
- ip->button1 = main_control_ctrlwin_button1_create(ip, ip->controls3);
- if (!ip->message9)
- ip->message9 = main_control_ctrlwin_message9_create(ip, ip->controls3);
- if (!ip->controls4)
- ip->controls4 = main_control_ctrlwin_controls4_create(ip, ip->ctrlwin);
- if (!ip->infomesg)
- ip->infomesg = main_control_ctrlwin_infomesg_create(ip, ip->controls4);
- if (!ip->message3)
- ip->message3 = main_control_ctrlwin_message3_create(ip, ip->controls4);
- if (!ip->xlabel)
- ip->xlabel = main_control_ctrlwin_xlabel_create(ip, ip->controls4);
- if (!ip->message4)
- ip->message4 = main_control_ctrlwin_message4_create(ip, ip->controls4);
- if (!ip->ylabel)
- ip->ylabel = main_control_ctrlwin_ylabel_create(ip, ip->controls4);
- if (!ip->message5)
- ip->message5 = main_control_ctrlwin_message5_create(ip, ip->controls4);
- if (!ip->glabel)
- ip->glabel = main_control_ctrlwin_glabel_create(ip, ip->controls4);
- if (!ip->imglabel)
- ip->imglabel = main_control_ctrlwin_imglabel_create(ip, ip->controls4);
- return ip;
- }
-
- /*
- * Create object `ctrlwin' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_ctrlwin_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
- Xv_opaque ctrlwin_image;
- static unsigned short ctrlwin_bits[] = {
- #include "genial.icon"
- };
-
- ctrlwin_image = xv_create(XV_NULL, SERVER_IMAGE,
- SERVER_IMAGE_DEPTH, 1,
- SERVER_IMAGE_BITS, ctrlwin_bits,
- XV_WIDTH, 64,
- XV_HEIGHT, 64,
- NULL);
- obj = xv_create(owner, FRAME,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 335,
- XV_HEIGHT, 453,
- XV_LABEL, "GENIAL Control (version 1.2)",
- FRAME_SHOW_FOOTER, FALSE,
- FRAME_SHOW_RESIZE_CORNER, FALSE,
- FRAME_ICON, xv_create(XV_NULL, ICON,
- ICON_IMAGE, ctrlwin_image,
- NULL),
- NULL);
- return obj;
- }
-
- /*
- * Create object `controls1' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_controls1_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, 0,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, 255,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message1' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message1_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 8,
- PANEL_LABEL_STRING, "Image:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `image_fname' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_image_fname_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:image_fname",
- XV_X, 72,
- XV_Y, 8,
- PANEL_LABEL_STRING, "file name",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `file' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_file_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void file_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:file",
- XV_X, 192,
- XV_Y, 8,
- PANEL_LABEL_STRING, "Load/Save...",
- PANEL_NOTIFY_PROC, file_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `quit' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_quit_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void quit_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:quit",
- XV_X, 284,
- XV_Y, 8,
- PANEL_LABEL_STRING, "Quit",
- PANEL_NOTIFY_PROC, quit_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `prev' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_prev_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void prev_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:prev",
- XV_X, 228,
- XV_Y, 32,
- PANEL_LABEL_STRING, "<",
- PANEL_NOTIFY_PROC, prev_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `next' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_next_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void next_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:next",
- XV_X, 258,
- XV_Y, 32,
- PANEL_LABEL_STRING, ">",
- PANEL_NOTIFY_PROC, next_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `frame_stat' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_frame_stat_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:frame_stat",
- XV_X, 292,
- XV_Y, 35,
- PANEL_LABEL_STRING, "0/0",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `func_sel' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_func_sel_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void func_sel_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:func_sel",
- XV_X, 8,
- XV_Y, 40,
- PANEL_CHOICE_NCOLS, 1,
- PANEL_LAYOUT, PANEL_VERTICAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_LABEL_STRING, "Function:",
- PANEL_NOTIFY_PROC, func_sel_proc,
- PANEL_CHOICE_STRINGS,
- "Trace",
- "Histogram",
- "Zoom",
- "Distance",
- "Angle Measure",
- "Annotate",
- "Comment File",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `reg_type' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_reg_type_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void reg_type_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:reg_type",
- XV_X, 128,
- XV_Y, 40,
- PANEL_CHOICE_NCOLS, 1,
- PANEL_LAYOUT, PANEL_VERTICAL,
- PANEL_CHOOSE_NONE, FALSE,
- PANEL_LABEL_STRING, "Mode:",
- PANEL_NOTIFY_PROC, reg_type_proc,
- PANEL_CHOICE_STRINGS,
- "Line",
- "Spline",
- "C-Spline",
- "Polygon",
- "Box",
- "Text",
- "Arrow",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message2' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message2_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 224,
- XV_Y, 60,
- PANEL_LABEL_STRING, "Curr Log #:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `log_num' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_log_num_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:log_num",
- XV_X, 308,
- XV_Y, 60,
- PANEL_LABEL_STRING, "00",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `eval' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_eval_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void eval_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:eval",
- XV_X, 216,
- XV_Y, 80,
- PANEL_LABEL_STRING, "Eval",
- PANEL_NOTIFY_PROC, eval_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `refresh' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_refresh_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void refresh_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:refresh",
- XV_X, 264,
- XV_Y, 80,
- PANEL_LABEL_STRING, "Refresh",
- PANEL_NOTIFY_PROC, refresh_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `clear' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_clear_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void clear_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:clear",
- XV_X, 216,
- XV_Y, 109,
- PANEL_LABEL_STRING, "Clear Last",
- PANEL_NOTIFY_PROC, clear_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `clear_all' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_clear_all_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void clear_all_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:clear_all",
- XV_X, 216,
- XV_Y, 138,
- PANEL_LABEL_STRING, "Clear All",
- PANEL_NOTIFY_PROC, clear_all_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `display' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_display_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void dpyopt_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:display",
- XV_X, 216,
- XV_Y, 167,
- PANEL_LABEL_STRING, "Display Opts...",
- PANEL_NOTIFY_PROC, dpyopt_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `setting1' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_setting1_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void set_clean_mode();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_TOGGLE, PANEL_FEEDBACK, PANEL_MARKED,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 216,
- XV_Y, 196,
- PANEL_CHOICE_NCOLS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_LABEL_STRING, "Clean:",
- PANEL_NOTIFY_PROC, set_clean_mode,
- NULL);
- return obj;
- }
-
- /*
- * Create object `lmode' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_lmode_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void linemode_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:lmode",
- XV_X, 8,
- XV_Y, 223,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_LABEL_STRING, "Line Drawing Mode:",
- PANEL_NOTIFY_PROC, linemode_proc,
- PANEL_CHOICE_STRINGS,
- "Click and Click",
- "Click and Drag",
- "Least Squares Fit",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `controls2' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_controls2_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, (int)xv_get(ip->controls1, XV_Y) +
- (int)xv_get(ip->controls1, XV_HEIGHT) + 2,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, 73,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `statmsg1' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_statmsg1_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 4,
- PANEL_LABEL_STRING, "1",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `statmsg2' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_statmsg2_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 21,
- PANEL_LABEL_STRING, "2",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `statmsg3' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_statmsg3_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 38,
- PANEL_LABEL_STRING, "3",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `statmsg4' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_statmsg4_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 55,
- PANEL_LABEL_STRING, "4",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `controls3' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_controls3_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, (int)xv_get(ip->controls2, XV_Y) +
- (int)xv_get(ip->controls2, XV_HEIGHT) + 2,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, 64,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `edit_mode' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_edit_mode_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void edit_region_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
- XV_KEY_DATA, INSTANCE, ip,
- XV_HELP_DATA, "main_control:edit_mode",
- XV_X, 88,
- XV_Y, 6,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_LABEL_STRING, "Edit:",
- PANEL_NOTIFY_PROC, edit_region_proc,
- PANEL_CHOICE_STRINGS,
- "Off",
- "modify",
- "delete",
- "copy",
- "frame copy",
- "hide",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `edit_ok' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_edit_ok_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void do_edit_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 256,
- XV_Y, 8,
- PANEL_LABEL_STRING, "OK",
- PANEL_NOTIFY_PROC, do_edit_proc,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message7' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message7_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 11,
- PANEL_LABEL_STRING, "Log Edit:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `edit_log_num' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_edit_log_num_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void edit_log_num_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_CHOICE, PANEL_DISPLAY_LEVEL, PANEL_CURRENT,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 32,
- PANEL_CHOICE_NROWS, 1,
- PANEL_LAYOUT, PANEL_HORIZONTAL,
- PANEL_LABEL_STRING, "Log #:",
- PANEL_NOTIFY_PROC, edit_log_num_proc,
- PANEL_CHOICE_STRINGS,
- "1",
- "2",
- "3",
- "4",
- NULL,
- NULL);
- return obj;
- }
-
- /*
- * Create object `button1' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_button1_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- extern void renumber_logged_objects();
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_BUTTON,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 248,
- XV_Y, 34,
- PANEL_LABEL_STRING, "Renumber",
- PANEL_NOTIFY_PROC, renumber_logged_objects,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message9' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message9_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 119,
- XV_Y, 37,
- PANEL_LABEL_STRING, "Angle Measure",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `controls4' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_controls4_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, (int)xv_get(ip->controls3, XV_Y) +
- (int)xv_get(ip->controls3, XV_HEIGHT) + 2,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- WIN_BORDER, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `infomesg' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_infomesg_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 8,
- PANEL_LABEL_STRING, "1",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message3' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message3_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 24,
- PANEL_LABEL_STRING, "X:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `xlabel' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_xlabel_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 32,
- XV_Y, 24,
- PANEL_LABEL_STRING, "0",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message4' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message4_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 88,
- XV_Y, 24,
- PANEL_LABEL_STRING, "Y:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `ylabel' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_ylabel_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 112,
- XV_Y, 24,
- PANEL_LABEL_STRING, "0",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `message5' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_message5_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 200,
- XV_Y, 24,
- PANEL_LABEL_STRING, "Gray:",
- PANEL_LABEL_BOLD, TRUE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `glabel' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_glabel_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 240,
- XV_Y, 24,
- PANEL_LABEL_STRING, "0",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Create object `imglabel' in the specified instance.
- */
- Xv_opaque
- main_control_ctrlwin_imglabel_create(ip, owner)
- main_control_ctrlwin_objects *ip;
- Xv_opaque owner;
- {
- Xv_opaque obj;
-
- obj = xv_create(owner, PANEL_MESSAGE,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 8,
- XV_Y, 40,
- PANEL_LABEL_STRING, "0x0, [0:255], byte",
- PANEL_LABEL_BOLD, FALSE,
- NULL);
- return obj;
- }
-
- /*
- * Initialize an instance of object `imgwin'.
- */
- main_control_imgwin_objects *
- main_control_imgwin_objects_initialize(ip, owner)
- main_control_imgwin_objects *ip;
- Xv_opaque owner;
- {
- if (!ip && !(ip = (main_control_imgwin_objects *) calloc(1, sizeof (main_control_imgwin_objects))))
- return (main_control_imgwin_objects *) NULL;
- if (!ip->imgwin)
- ip->imgwin = main_control_imgwin_imgwin_create(ip, owner);
- if (!ip->imgcanv)
- ip->imgcanv = main_control_imgwin_imgcanv_create(ip, ip->imgwin);
- return ip;
- }
-
- /*
- * Create object `imgwin' in the specified instance.
- */
- Xv_opaque
- main_control_imgwin_imgwin_create(ip, owner)
- main_control_imgwin_objects *ip;
- Xv_opaque owner;
- {
- extern Notify_value main_control_imgwin_event_callback();
- Xv_opaque obj;
-
- obj = xv_create(owner, FRAME,
- XV_KEY_DATA, INSTANCE, ip,
- XV_WIDTH, 450,
- XV_HEIGHT, 369,
- XV_LABEL, "GENIAL Image",
- XV_SHOW, FALSE,
- FRAME_SHOW_FOOTER, FALSE,
- FRAME_SHOW_RESIZE_CORNER, TRUE,
- NULL);
- xv_set(obj, WIN_CONSUME_EVENTS,
- NULL, NULL);
- notify_interpose_event_func(obj,
- (Notify_func) main_control_imgwin_event_callback, NOTIFY_SAFE);
- return obj;
- }
-
- /*
- * Create object `imgcanv' in the specified instance.
- */
- Xv_opaque
- main_control_imgwin_imgcanv_create(ip, owner)
- main_control_imgwin_objects *ip;
- Xv_opaque owner;
- {
- extern Notify_value imgwin_event_proc();
- extern void imgwin_repaint_proc();
- Xv_opaque obj;
-
- obj = xv_create(owner, CANVAS,
- XV_KEY_DATA, INSTANCE, ip,
- XV_X, 0,
- XV_Y, 0,
- XV_WIDTH, WIN_EXTEND_TO_EDGE,
- XV_HEIGHT, WIN_EXTEND_TO_EDGE,
- CANVAS_REPAINT_PROC, imgwin_repaint_proc,
- CANVAS_X_PAINT_WINDOW, TRUE,
- NULL);
- xv_create(obj, SCROLLBAR, SCROLLBAR_DIRECTION, SCROLLBAR_HORIZONTAL, NULL);
- xv_create(obj, SCROLLBAR, SCROLLBAR_DIRECTION, SCROLLBAR_VERTICAL, NULL);
- xv_set(canvas_paint_window(obj), WIN_CONSUME_EVENTS,
- WIN_MOUSE_BUTTONS,
- LOC_MOVE,
- LOC_DRAG,
- LOC_WINENTER,
- LOC_WINEXIT,
- WIN_ASCII_EVENTS,
- WIN_LEFT_KEYS,
- WIN_RIGHT_KEYS,
- WIN_TOP_KEYS,
- NULL, NULL);
- notify_interpose_event_func(canvas_paint_window(obj),
- (Notify_func) imgwin_event_proc, NOTIFY_SAFE);
- /*
- * This line is here for backwards compatibility. It will be
- * removed for the next release.
- */
- xv_set(canvas_paint_window(obj), XV_KEY_DATA, INSTANCE, ip, NULL);
- return obj;
- }
-
-